package 蓝桥杯;


import java.util.Scanner;

public class 砍树 {

    public static void main(String[] args) {
        int n , i;
        Scanner s1 = new Scanner(System.in);
        n = s1.nextInt();
        int[] a = new int[n];
        for(i=0;i<n;i++){
            a[i] = s1.nextInt();
        }
        for(i=0;i<n;i++)
        {
            for(;i + 1 < n &&a[i]<a[i+1];i++){

            }
            System.out.println(i+1);
            for(;i + 1 < n && a[i]>a[i+1];i++){

            }
        }
    }

}
